<template>
	<view class="classLayout pageBg">
		<custom-nav-bar></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="(item,index) in clssifyList" :key="item._id" :item="item"></theme-item>
		</view>
		
	</view>
</template>

<script setup>
	import { apiGetClssify } from '@/api/apis.js';
	import {onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app"
	
	const clssifyList = ref([]);
	
	//获取专题精选分类
	const getClssify = async () => {
		let res = await apiGetClssify({
			pageSize: 15
		});
		clssifyList.value = res.data;
	};
	
	//分享朋友
	onShareAppMessage((res)=>{
		console.log(res);
		return {
			title:"壁纸分类来了",
			path:"pages/classify/classify"
		};
	});
	
	//分享朋友圈
	onShareTimeline(()=>{
		return {
			title:"安谊壁纸来了",
			//imageUrl:bannerList.value[0].picurl
		};
	});
	getClssify();
</script>

<style lang="scss" scoped>
	.classLayout{
		
		.classify{
			padding: 30rpx;
			display: grid;
			gap: 15rpx;
			grid-template-columns: repeat(3,1fr);
			
		}
	}

</style>
